﻿/*******************************************************************************
 * Size: 20 px
 * Bpp: 1
 * Opts: --bpp 1 --size 20 --use-color-info --font iconfont.ttf --range 58901,59064,58898,59792,58955,58901 --format lvgl -o MY_PSWD_SYMBOL_20.c
 ******************************************************************************/

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif

#ifndef MY_PSWD_SYMBOL_20
#define MY_PSWD_SYMBOL_20 1
#endif

#if MY_PSWD_SYMBOL_20

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+E612 "" */
    0xfe, 0x17, 0xc3, 0x18, 0x63, 0xb, 0xe1, 0x0,
    0x2f, 0xfd, 0xff, 0x80, 0x15, 0x82, 0x8, 0x57,
    0x8, 0x21, 0x5c, 0x20, 0x87, 0xf0,

    /* U+E615 "" */
    0x3c, 0x0, 0x46, 0x0, 0x82, 0x0, 0x82, 0x0,
    0x82, 0x0, 0x87, 0xff, 0x4, 0x1, 0x4, 0x61,
    0x4, 0x91, 0x4, 0x91, 0x4, 0x60, 0x4, 0x1,
    0x7, 0xff,

    /* U+E64B "" */
    0x3, 0xc0, 0xc, 0x30, 0x18, 0x18, 0x30, 0x1c,
    0x30, 0xc, 0x30, 0xc, 0x30, 0xc, 0xff, 0xff,
    0xc0, 0x3, 0xc0, 0x3, 0xc1, 0x83, 0xc1, 0x83,
    0xc1, 0x83, 0xc1, 0x83, 0xc0, 0x3, 0xe0, 0x7,
    0x7f, 0xfe,

    /* U+E6B8 "" */
    0x1f, 0x3, 0xc, 0x4c, 0x65, 0x8a, 0x96, 0x9a,
    0x94, 0xa9, 0x52, 0x95, 0x29, 0x52, 0x6d, 0x21,
    0x91, 0x72, 0x10, 0x21, 0xc, 0x17, 0x80,

    /* U+E990 "" */
    0xff, 0xff, 0xe0, 0x0, 0xf0, 0x0, 0x7b, 0xdf,
    0xbd, 0x88, 0xde, 0xc4, 0x6f, 0x67, 0x37, 0xb3,
    0x9b, 0xd9, 0xcd, 0xec, 0x6, 0xf6, 0x3, 0x7b,
    0xff, 0xbc, 0x0, 0x1e, 0x0, 0xf, 0x0, 0x7,
    0xff, 0xff
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 320, .box_w = 11, .box_h = 16, .ofs_x = 6, .ofs_y = -1},
    {.bitmap_index = 22, .adv_w = 320, .box_w = 16, .box_h = 13, .ofs_x = 1, .ofs_y = 1},
    {.bitmap_index = 48, .adv_w = 320, .box_w = 16, .box_h = 17, .ofs_x = 2, .ofs_y = -1},
    {.bitmap_index = 82, .adv_w = 320, .box_w = 12, .box_h = 15, .ofs_x = 4, .ofs_y = 0},
    {.bitmap_index = 105, .adv_w = 320, .box_w = 17, .box_h = 16, .ofs_x = 1, .ofs_y = -1}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0x3, 0x39, 0xa6, 0x37e
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 58898, .range_length = 895, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 5, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LVGL_VERSION_MAJOR == 8
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
#endif

#if LVGL_VERSION_MAJOR >= 8
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 1,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LVGL_VERSION_MAJOR == 8
    .cache = &cache
#endif
};

//extern const lv_font_t NULL;


/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LVGL_VERSION_MAJOR >= 8
const lv_font_t MY_PSWD_SYMBOL1_20 = {
#else
lv_font_t MY_PSWD_SYMBOL1_20 = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 17,          /*The maximum line height required by the font*/
    .base_line = 1,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = 0,
    .underline_thickness = 0,
#endif
    .dsc = &font_dsc,          /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
    .fallback = NULL,
#endif
    .user_data = NULL,
};



#endif /*#if MY_PSWD_SYMBOL_20*/

